package za.co.dylanjaneke.airdownloader.command
{
	import za.co.dylanjaneke.airdownloader.events.ShowHomeEvent;
	import za.co.dylanjaneke.airdownloader.model.ScreenNavigatorPM;

	/**
	 * Author: Dylan Janeke.
	 */
	[Bindable]
	[Name("showHomeCommand")]
	public class ShowHomeCommand
	{
		[Inject]
		public var screenNavigator:ScreenNavigatorPM;
		
		[Observer]
		public function handleShowHomeEvent(event:ShowHomeEvent): void
		{
			VicariousDownloader.resetSize();
			screenNavigator.switchView(ScreenNavigatorPM.HOME);		
		}
	}
}